<!DOCTYPE html>
<html>
<head>
<title>${module.name} - 选择项类型维护</title>
<jsp:include page="../../include/header.jsp" />
</head>
<body class="">
<form action="base/selecttype/selecttype!update.action" method="post" id="selecttypeUpdateForm">
<input type="hidden" id="moduleId" value="${module.id}" />
<input type="hidden" id="moduleName" value="${module.name}" />
<div class="breadcrumb">
	<a class="btn btn-success btn-small" 
			href="base/module/module!view.action?id=${module.id}">返回</a>
	<a class="btn btn-success btn-small" href="javascript:;" id="btnAddSelecttype">添加新类型</a>
	<a class="btn btn-success btn-small" href="javascript: document.getElementById('selecttypeUpdateForm').submit();">保存</a>
</div>
<c:if test="${resultStatus!=null}">
	<c:choose>
		<c:when test="${resultStatus.success}">
			<div class="alert alert-success">
				<i class="icon-info-sign icon-large"></i>
				<button type="button" class="close" data-dismiss="alert">&times;</button>
				${resultStatus.message}
			</div>
		</c:when>
		<c:otherwise>
			<div class="alert alert-error">
				<i class="icon-info-sign icon-large"></i>
				<button type="button" class="close" data-dismiss="alert">&times;</button>
				${resultStatus.message}
			</div>
		</c:otherwise>
	</c:choose>
</c:if>
<table class="table table-striped" id="selecttypeList">
	<thead>
		<tr>
			<th>ID</th>
			<th>名称</th>
			<th>说明</th>
			<th>所在模块</th>
			<th>编辑</th>
			<th>删除</th>
		</tr>
	</thead>
	<tbody>
	<c:forEach var="selecttype" items="${selecttypes}" varStatus="status">
		<tr>
			<td>
				<input type="hidden" name="selecttypes[${status.index}].code" value="${selecttype.code}" />
				<input type="hidden" name="selecttypes[${status.index}].module.id" value="${selecttype.module.id}" />
				<input type="text" readonly name="selecttypes[${status.index}].id" value="${selecttype.id}" />
			</td>
			<td>
				<input type="text" name="selecttypes[${status.index}].name" value="${selecttype.name}" />
			</td>
			<td>
				<input type="text" name="selecttypes[${status.index}].description" value="${selecttype.description}" />
			</td>
			<td>${selecttype.module.name}</td>
			<td><a href="base/selectitem/selectitem!listForUpdate.action?selecttypeId=${selecttype.id}">编辑选择项</a></td>
			<td><a class="btn btn-danger btn-small" href="base/selecttype/selecttype!delete.action?moduleId=${module.id}&id=${selecttype.id}">删除</a></td>
		</tr>
	</c:forEach>
	</tbody>
</table>
</form>
</body>
</html>
<script>
base.selecttype.initselecttypeUpdatePage();
</script>